<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>修改员工信息</title>
<script th:src="@{css.js}"></script>
</head>
<body>
	<div class="page-container">
		<form action="do_employ_edit" method="post"
			class="form form-horizontal responsive" id="demoform">
			
			<div class="row cl">
				<label class="form-label col-xs-3">姓名：</label>
				<div class="formControls col-xs-8">
					<input type="text" class="input-text" id="name" name="name" th:value="${session.Bank.name}" readonly="readonly">
				</div>
				</div>
			<div class="row cl">
				<label class="form-label col-xs-3">银行卡号：</label>
				<div class="formControls col-xs-8">
					<input type="text" class="input-text" id="creditCard" name="creditCard" th:value="${session.Bank.creditCard}">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-3">银行：</label>
				<div class="formControls col-xs-8">
					<input type="text" class="input-text" id="bank" name="bank" th:value="${session.Bank.bank}">
				</div>
			</div>
		</form>

		<div class="col-xs-8 col-xs-offset-3">
			<button type="button" onclick="do_edit()">提交</button>
		</div>


		<script>
			function do_edit() {
				$.ajax({
					url : 'do_employ_add',
					data : {
						'name' : $("#name").val(),
						'creditCard' : $("#creditCard").val(),
						'bank' : $("#bank").val(),
						
					},
					method : "post",
					success : function(data) {
						if (data == 'ok') {
							alert("修改成功");
							shutdown();
						}
					}
				});
			}
		</script>

		<script>
			function shutdown() {
				var index = parent.layer.getFrameIndex(window.name);//得到当前ifram层的索引
				parent.location.reload();
				parent.layer.close(index);//再次执行关闭
			}
		</script>
	</div>
</body>
<script th:src="@{js.js}"></script>
</html>